using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Collections.Generic;

namespace Repo {
	public class ctrlMenu:Control {
		public string Selected;

		public void Add(object key,string text,string href) {

			list.Add(new string[] { key.ToString(),text,href });

		}

		List<string[]> list=new List<string[]>(80);

		protected override void Render(HtmlTextWriter writer) {
			foreach(string[] str in list)
			{
				string sel=(Selected==str[0])?" style=\"color:red;\"":"";
				writer.Write("<a href=\"{1}\"{2}>{0}</a>",str[1],str[2],sel);
			}
		}
	}
}
